	SUBROUTINE TEMPORAL
	USE DAMOD
	REAL::T_STEP(NCELLS),INIW(4,NCELLS),INID(4,NCELLS),CVF(4,NCELLS),ALFA(4)
!-----  INPUT--------------------------
	ALFA=[ALFA1,ALFA2,ALFA3,ALFA4]
	W(1,:)=W18;W(2,:)=W28;W(3,:)=W38;W(4,:)=W48
	OPEN(36,FILE='RF2.DAT',FORM='FORMATTED')
	II=1
	INIW=W
	CALL FX(CVF)
	CALL ADISS(INID,T_STEP)
	RES=CVF-INID
!       call resmooth
	DO I=1,NCELLS
	   W(:,I)=INIW(:,I)-ALFA(1)*T_STEP(I)*RES(:,I)
	ENDDO
	DO IA=2,4
	   CALL FX(CVF)
	   RES=CVF-INID
!       call resmooth
	   DO I=1,NCELLS
	      W(:,I)=INIW(:,I)-ALFA(IA)*T_STEP(I)*RES(:,I)
	   ENDDO
	ENDDO
	FIRSTR2=0.
	DO I=1,NCELLS
	   FIRSTR2=FIRSTR2+(W(1,I)-INIW(1,I))**2
	ENDDO
	FIRSTR2=SQRT(FIRSTR2)
	PRINT*,II,0.
	WRITE(36,36)II,0.
	DO II=2,3000
!       DO II=2,2
	INIW=W
	CALL FX(CVF)
	CALL ADISS(INID,T_STEP)
	RES=CVF-INID
!       call resmooth
	DO I=1,NCELLS
	   W(:,I)=INIW(:,I)-ALFA(1)*T_STEP(I)*RES(:,I)
	ENDDO
	DO IA=2,4
	   CALL FX(CVF)
	   RES=CVF-INID
!       call reSMOOTH
	   DO I=1,NCELLS
	      W(:,I)=INIW(:,I)-ALFA(IA)*T_STEP(I)*RES(:,I)
	   ENDDO
	ENDDO
	RF2=0.
	DO I=1,NCELLS
	   RF2=RF2+(W(1,I)-INIW(1,I))**2
	ENDDO
	RF2=SQRT(RF2)
	RF2=LOG10(RF2/FIRSTR2)
	PRINT*,II,RF2
	WRITE(36,36)II,RF2
	IF(RF2<-8.0)EXIT
	ENDDO
	CLOSE(36)
	IF(CV=='cv')CALL CVEXPORT 
	IF(CV=='cc')CALL CCEXPORT
 36	FORMAT(I7,E15.7)
	END
